package edu.uts.reekie.designer.implementation.figures;

import org.eclipse.draw2d.PolygonDecoration;
import org.eclipse.draw2d.geometry.PointList;


public class CallbackDecoration extends PolygonDecoration {
	/** Template for a triangle that points to the right when the rotation angle is 0 */
	public static final PointList CALLBACK_TIP = new PointList();
	
	
	static {
		CALLBACK_TIP.addPoint(0, 0);
		CALLBACK_TIP.addPoint(-20, 20);
		CALLBACK_TIP.addPoint(-20, 1);
		CALLBACK_TIP.addPoint(-41, 1);
		CALLBACK_TIP.addPoint(-41, -20);
		CALLBACK_TIP.addPoint(-50, -20);
		
		CALLBACK_TIP.addPoint(-50, -1);
		
		CALLBACK_TIP.addPoint(-70, -20);
		CALLBACK_TIP.addPoint(-50, -40);
		CALLBACK_TIP.addPoint(-50, -21);
		CALLBACK_TIP.addPoint(-39, -21);
		CALLBACK_TIP.addPoint(-39, -1);
		
		CALLBACK_TIP.addPoint(-20, -1);
		CALLBACK_TIP.addPoint(-20, -20);
		
		CALLBACK_TIP.addPoint(0, 0);
	}
	
	
	public CallbackDecoration(){
		super();
		
		setTemplate(CALLBACK_TIP);
		setScale(0.5,0.5);
	}
}
